﻿using System;
using System.Collections.Generic;

using Moe.ECamel.Common.Entities;

namespace Moe.ECamel.Common.Contracts
{
	public class SearchItemsResponse
	{
		public IList<SearchItemResult> Items { get; set; }
	}

	public class SearchItemResult
	{
		public Item Item { get; set; }

		public int ItemId
		{
			get { return Item.ItemId; }
		}
		public String ItemTypeName
		{
			get { return Item.ItemType.ItemTypeName; }
		}
		public String Title
		{
			get { return Item.Title; }
		}
		public String CatalogNumber
		{
			get { return Item.CatalogNumber; }
		}

		public int NumOfCopies { get; set; }
		public int NumOfAvailableCopies { get; set; }
		public string Availability
		{
			get { return NumOfCopies + " / " + NumOfAvailableCopies; }
		}
	}
}
